<template>
    <view class="taskDetails">
        <uni-nav-bar fixed left-icon="left" title="客户名称" @clickLeft="backHandle" class="unibarS">
            <!-- <block slot="right">
                <text class="sub-btn" @click="submit">新建回款</text>
            </block> -->
        </uni-nav-bar>
        <!-- 主要内容 -->
        <view class="taskDetails-content">
            <!-- 任务信息 -->
            <view class="customer-info">
                <view class="top">
                    <view>下次跟进</view>
                    <view>2024-04-15 12:00</view>
                </view>
                <view class="middle">
                    <view>客户名称</view>
                    <view>手机号码</view>
                </view>
                <view class="bottom">
                    <view>李小萌</view>
                    <view>19901488238</view>
                </view>
            </view>
            <view class="info-c">
                <view>
                    <view class="item-title">基本信息</view>
                    <view class="item-content">
                        <view class="item-content-row">
                            <view>客户名称</view>
                            <view>客户名称客户名称客户名称</view>
                        </view>
                        <view class="item-content-row">
                            <view>商机来源</view>
                            <view>电话营销</view>
                        </view>
                        <view class="item-content-row">
                            <view>获取日期</view>
                            <view>2024-03-15</view>
                        </view>
                        <view class="item-content-row">
                            <view>归属人员</view>
                            <view>赵小刚</view>
                        </view>
                        <view class="item-content-row">
                            <view>备注信息</view>
                            <view>备注信息</view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <!-- 底部 -->
        <view class="bottom-box">
            <template>
                <view class="row-box">
                    <u-icon name="photo" color="#0C1019" size="22"></u-icon>
                    <text>转为客户</text>
                </view>
            </template>
        </view>
    </view>
</template>

<script>
// import CusromerDetailed from './components/cusromerDetailed.vue'
export default {

    data() {
        return {
            title: '创建客户',
            userInfo: {
                name: '张三',
                phone: null,
                classType: null,   // 客户类型
                state: null, // 客户状态
                rate: null, // 客户星级
                source: null, // 客户来源
                // 业务员
                salesman: null,
                city: null, // 省市
                address: null, // 地址
                isFollow: true, // 是否跟进
                followTime: null,
                followContent: null, // 跟进内容
                remind: null, // 跟进提醒
                remindType: null, // 跟进提醒类型
            },
            list: [
                { name:'未签到完成', type: 1 },
                { name:'已签到完成', type: 2 }
            ],
            show:false,
            id: null,
        }
    },
    onLoad(options) {
        console.log('onLoad')
        if(options.id) {
            this.id = options.id
            this.getData()
        }
    },
    methods: {
        getData() {
            this.$http.get('/app/customer/detailedInforMtion/' + this.id, {}).then(res => {
                if (res.code == 200) {
   
                } else {
                    uni.$u.toast(res.msg)
                }
            })
        },
        backHandle() {
            uni.navigateBack()
        }
    }
}
</script>

<style lang="scss" scoped>
/deep/.uni-navbar__header-btns-right {
    width: 64px !important;
}
// .unibarS {
//     /deep/.uni-navbar__header {
//         padding: 0 32rpx;
//     }

//     /deep/.uni-navbar__content {
//         border-bottom: none !important;
//         box-shadow: 0px 0px 4px rgba(136, 136, 136, 0.12);
//     }

//     .sub-btn {
//         font-size: 32rpx;
//         font-weight: 400;
//         color: rgba(77, 172, 177, 1);
//     }
// }

.taskDetails {
    padding-bottom: 150rpx;
}

.taskDetails-content {
    margin: 20rpx 0;

    .customer-info {
        border-radius: 24px;
        background: rgba(77, 172, 177, 1);
        padding: 36rpx 40rpx;
        margin: 0 32rpx;
        color: rgba(255, 255, 255, 1);

        .customer-row-title {
            padding: 0 32rpx;
            text-align: center;
        }

        > view {
            display: flex;
            justify-content: space-between;
            text-align: center;
            color: rgba(255, 255, 255, 1);
        }
        .top {
            font-size: 28rpx;
            font-weight: 400;
            margin-bottom: 36rpx;
        }
        .middle {
            font-size: 28rpx;
            font-weight: 400;
            margin-bottom: 8rpx;
        }
        .bottom {
            font-size: 44rpx;
            font-weight: 500;
            > view {
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }
        }
    }

    .item-title {
        padding: 48rpx 32rpx 20rpx 32rpx;
        font-size: 32rpx;
        font-weight: 500;
        color: rgba(12, 16, 25, 1);
    }

    .item-content {
        background: rgba(255, 255, 255, 1);
        padding: 0 32rpx;
        border-radius: 24rpx;

        .item-content-row {
            display: flex;
            justify-content: space-between;
            padding: 26rpx 0;
            font-size: 28rpx;
            border-bottom: 2rpx solid rgba(240, 240, 240, 1);

            >view:nth-child(1) {
                font-weight: 400;
                color: rgba(103, 117, 133, 1);
                width: 140rpx;
            }

            >view:nth-child(2) {
                flex: 1;
                font-weight: 500;
                color: rgba(12, 16, 25, 1);
                // 超出隐藏显示省略号
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                text-align: right;
            }
        }
    }
}

.bottom-box {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 0px 12rpx rgba(0, 0, 0, 0.1);
    padding: 32rpx 0;

    .row-box {
        display: flex;
        align-items: center;
    }
    .column-box {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    text {
        font-size: 28rpx;
        font-weight: 500;
        color: rgba(12, 16, 25, 1);
        margin-left: 8rpx;
    }

}

.popup-box {
    padding: 32rpx 0;

    .popup-header {
        display: flex;
        justify-content: center;
        margin-bottom: 32rpx;
    }

    .icon-box {
        border-radius: 16rpx;
        background: #F2F2F2;
        width: 100rpx;
        height: 100rpx;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .grid-text {
        margin-top: 24rpx;
        margin-bottom: 32rpx;
        font-size: 28rpx;
    }
}
</style>